package d6_data_stream;

import java.io.DataOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FilterOutputStream;

/**
 * 2024/6/20  数据输出流 11：08
 */
public class DataOutputStreamTest1 {
    public static void main(String[] args) {
        //1.创建一个数据输出流包装低级的字节输出流
        try (
                DataOutputStream stream = new DataOutputStream(new FileOutputStream("file-io2\\src\\test\\DataOutputStream1"));
        ) {
            stream.writeInt(99);
            stream.writeDouble(11.2);
            stream.writeBoolean(false);
            stream.writeUTF("字节输出流");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
